package lesson5;

import java.util.Scanner;

//计算任意一个整数的所有约数。
public class Demo5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入整数...");
        int num = scanner.nextInt();
        for(int i = 1; i <= num; i++){
            if(num%i == 0){
                System.out.print(i);
                System.out.print(" ");
            }
        }
    }
}
